package xyz.xmh.pattern.behavioral.commandpattern;

/**
 * @author Administrator
 * 库存请求类
 */
public class Stock {

    /**
     * 名称
     */
    private final String name = "ABC";

    /**
     * 数量
     */
    private final int quantity = 10;

    /**
     * 功能买
     */
    public void buy() {
        System.out.println("Stock [ Name: " + name + ", Quantity: " + quantity + " ] bought");
    }

    /**
     * 功能卖
     */
    public void sell() {
        System.out.println("Stock [ Name: " + name + ", Quantity: " + quantity + " ] sold");
    }

}
